import ij.*;
import ij.process.*;
import ij.gui.*;
import java.awt.*;
import ij.plugin.filter.*;

public class pixel_map_enhancer_ implements PlugInFilter {
	ImagePlus imp;

	public int setup(String arg, ImagePlus imp) {
		this.imp = imp;
		return DOES_ALL;
	}

	public void run(ImageProcessor ip) {
		for(int i0=0;i0<ip.getWidth();i0++)
			for(int j0=0;j0<ip.getHeight();j0++)
			{
				if (ip.getPixelValue(i0,j0)>99)
					for(int i=i0-10;i<i0+11;i++)
						for(int j=j0-10;j<j0+11;j++)
							if (ip.getPixelValue(i,j)<50.0) 
								ip.putPixelValue(i,j,50);

			}	
		imp.updateAndDraw();
	}

}
